import Vue from "vue";
import Vuex from "vuex";

//需要时再引入
import user from "./module/user";
import address from "./module/address";
import dictionary from "./module/dictionary";
import role from "./module/role";

Vue.use(Vuex);

const store = new Vuex.Store({
  modules: { user, address, dictionary, role },
  getters: {
    isLogin: (state) => Boolean(state.user.token),
  },
});

export default store;
